<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<%include("/common/include.html"){}%>
		<style type="text/css">
			ul{
				height:auto;
				width:100%;
				padding:10px;
			}
			ul li{
				width:230px;
				display:inline-block;
			}
		</style>
	</head>
	<body style="overflow-x:hidden;">
		<form>
			<ul>
				<li>
					<span>开始日期：</span>
					<input style="width: 200px; height: 30px;" class="easyui-datebox theme-textbox-radius"  id="ksrq"/>
				</li>
				<li>
					<span>结束日期：</span>
					<input style="width: 200px; height: 30px;" class="easyui-datebox theme-textbox-radius"  id="jsrq" />
				</li>
				<li>
					<span>状态：</span>
					<select class="easyui-combobox theme-textbox-radius" style="width: 200px; height: 30px;" id="type" >
						<option value="">--请选择--</option>
						<option value="0">未读</option>
						<option value="1">已读</option>
					</select>
				</li>
				<li>
					<a href="#" class="easyui-linkbutton" data-options="iconCls:'icon-search'" style="width:200px" onclick="queryCustomer()">搜索</a>
				</li>
			</ul >
		</form>
		<div data-options="region:'center'" style="overflow-x:hidden;">
		<table class="easyui-datagrid" id ="announceInfo" style="width:100%;height:auto;"></table>
		</div>
		
		
		
		
		
		
		
		
		
		
		
		<script>
		
		
		
		function queryCustomer(){
			$('#announceInfo').datagrid({
				cls: "theme-datagrid",
				title:"公告信息",
				singleSelect: true,
				rownumbers: true, //显示序号
				fitColumns:true,
				pagination: true,
				pageSize: 10,
				url: "detailAnnounce/getDetailAnnounces",
				queryParams: {
					'_query.ksrq': $("#ksrq").val(),
					'_query.jsrq': $("#jsrq").val(),
					'_query.type': $("#type").val(),
				},
			    method: 'post',
			    collapsible:true,
			    columns:[[
							{field:'title',title:'标题',width:100,align:'center'},
							{field:'sendername',title:'发布人',width:30,align:'center'},
							{field:'postdate',title:'时间',width:30, align:'center'},
							{field:'type',title:'状态',width:30, align:'center',
								formatter: function(value,row,index){
									if(row.type == '1'){
										return  '已读';
									}else{
										return  '未读';
									}
								},
								styler: function (value, row, index) {
									if(row.type == '1'){
										 return 'color:green';
									}else{
										 return 'color:red';
									}
						             
						        }
							},
							{field:'operate',title:'操作',width:30, align:'center',
								formatter: function(value,row,index){
									return '<a onclick='+'check(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:red'+' class='+'l-btn-text'+'>查看</span></span></a>'
								}
								}						
							]]
			})
			
		}
		
		
		
		
		
		
		
		
		
		
		$('#announceInfo').datagrid({
			cls: "theme-datagrid",
			title:"公告信息",
			singleSelect: true,
			rownumbers: true, //显示序号
			fitColumns:true,
			pagination: true,
			pageSize: 10,
			url: "detailAnnounce/getDetailAnnounces",
			queryParams: {
				'_query.ksrq': $("#ksrq").val(),
				'_query.jsrq': $("#jsrq").val(),
				'_query.type': $("#type").val(),
			},
		    method: 'post',
		    collapsible:true,
			columns:[[
						{field:'title',title:'标题',width:100,align:'center'},
						{field:'sendername',title:'发布人',width:30,align:'center'},
						{field:'postdate',title:'时间',width:30, align:'center'},
						{field:'type',title:'状态',width:30, align:'center',
							formatter: function(value,row,index){
								if(row.type == '1'){
									return  '已读';
								}else{
									return  '未读';
								}
							},
							styler: function (value, row, index) {
								if(row.type == '1'){
									 return 'color:green';
								}else{
									 return 'color:red';
								}
					             
					        }
						},
						{field:'operate',title:'操作',width:30, align:'center',
							formatter: function(value,row,index){
								return '<a onclick='+'check(\'' + row.ids + '\')'+' class='+'button-edit button-success  l-btn l-btn-small'+'><span class='+'l-btn-left'+'><span  style='+'color:green'+' class='+'l-btn-text'+'>查看</span></span></a>'
							}
							}						
						]]
		})
		
		
		
		
		
		function operate(){
			return '<a href="#" style="display:inline-block;height:25px;width:80px;background:#1CCE78;line-height:25px;border-radius:3px;color:#ffffff;" onclick="check()">查&nbsp;&nbsp;看</a>';
		}
		function check(ids){
			loadViewDialog('查看公告', '${cxt !}/detailAnnounce/check?ids=' + ids,null);
		}
		</script>
	</body>
</html>
